<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%
	request.setCharacterEncoding("UTF-8");
	String cp = request.getContextPath();
	int i=0;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<style type="text/css">

td {
font-size: 10pt;
 }

</style>
</head>
<body>

<center>

<table border="1">


	<tr>
		<td width="350" colspan="2" align="center">
		상품 목록
		</td>
		<td width="50">
		<input type="button" value="상품 올리기" class="btn1"
		onclick="javascript:location.href='<%=cp%>/production/write.action';">
		</td>
	</tr>
	<tr>
		<td width="50" align="center">
		상품명
		</td>
		<td align="center">
		상품 설명
		</td>
		<td align="center">
		가격
		</td>
	</tr>
	
	<c:forEach var="dto" items="${lists}">
	<tr>
		<td width="50" align="center">
		${dto.name}
		</td>
		<td align="center">
		<c:forEach var="imageDTO" items="${listImage}">
		<c:if test="${imageDTO.productionNum==dto.productionNum}">
		<img width="250" height="250" src="${imageURI}${imageDTO.saveFileName}"><br/>
		</c:if>
		</c:forEach>
		${dto.name}<br/>
		<a href="<%=cp%>/production/article.action?productionNum=${dto.productionNum}">${dto.subject}</a>
		가격 : ${dto.price}<br/>
		</td>
		<td align="center">
		${dto.price}
		</td>
	</tr>
	</c:forEach>


</table>
</center>

</body>
</html>